home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
gsdbloo.exe
/
DEMOE007.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-02-25
|
3KB
|
108 lines
program DemoE007;
{------------------------------------------------------------------------------
Griffin Solutions Windows
Expanded Sample 7
Demo Program
Copyright (c) Richard F. Griffin
10 February 1992
102 Molded Stone Pl
Warner Robins, GA 31088
-------------------------------------------------------------
Demonstration program of Griffin Solutions window routines
********** Not For Use in a TurboVision Environment **********
-------------------------------------------------------------------------------}
uses
CRT,
GS_KeyI,
GS_Winfc;
const
ColorChart : array[0..15] of string[12]
= ('Black','Blue','Green','Cyan','Red','Magenta',
'Brown','LightGray','DarkGray','LightBlue','LightGreen',
'LightCyan','LightRed','LightMagenta','Yellow','White');
var
AskWin,
StatusWin,
WorkWin : GS_Wind_Objt;
textnrml,
foregrnd,
backnrml,
texthilt,
backhilt : byte;
x1,y1,x2,y2 : integer;
procedure ShowColors;
begin
GS_Wind_GetColors(textnrml,backnrml,foregrnd,texthilt,backhilt);
GS_Wind_SetFgMode;
writeln('ForeGround Color is ',ColorChart[foregrnd]);
GS_Wind_SetIvMode;
writeln('Highlighted Text Color is ',ColorChart[texthilt]);
writeln('Highlighted BackGround Color is ',ColorChart[backhilt]);
GS_Wind_SetNmMode;
writeln('Normal Text Color is ',ColorChart[textnrml]);
writeln('Normal BackGround Color is ',ColorChart[backnrml]);
end;
begin
ClrScr;
{Initialize windows}
WorkWin.InitWin(1,1,80,19,White,Black,Yellow,Blue,LightGray,True,
'[ COLOR INFORMATION ]',true);
AskWin.InitWin(20,8,60,12,Yellow,Blue,Yellow,Black,LightGray,true,
'',true);
StatusWin.InitWin(1,20,80,25,Yellow,Red,Yellow,Red,LightGray,true,'',true);
{Open WorkWin and display parameters and colors}
WorkWin.SetWin;
GS_Wind_GetWinSize(x1,y1,x2,y2);
GotoXY(1,1);
writeln('Window size parameters are ',x1,',',y1,',',x2,',',y2);
writeln;
ShowColors;
{Change WorkWin Colors}
GS_Wind_SetColors(Magenta,Cyan,Blue,Yellow,Green);
GS_Wind_SetNmMode;
writeln;
writeln(' Colors are now different');
writeln;
ShowColors;
{Open StatusWin window after labeling}
StatusWin.NamWin('[ Labeling the Status Box ]');
StatusWin.SetWin;
{Open AskWin window, wait for key press, and close AskWin}
AskWin.SetWin;
GoToXY(5,2);
write('Press any key to continue');
WaitForKey;
AskWin.RelWin;
{Back in StatusWin window}
GoToXY(5,2);
write('Press any key to exit');
WaitForKey;
{Close windows}
StatusWin.RelWin;
WorkWin.RelWin;
end.